﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:ig="http://schemas.infragistics.com/xaml"
	xmlns:igCA="http://infragistics.com/Chart"
	xmlns:OMANE_Modules_TauxGarantis_ViewModels="clr-namespace:OMANE.Modules.TauxGarantis.ViewModels"
    xmlns:local="clr-namespace:OMANE.Modules.TauxGarantis" 
	mc:Ignorable="d"
	x:Class="Views.ViewStressTests"
	x:Name="UserControl"
	d:DesignWidth="640" d:DesignHeight="480">
	<UserControl.DataContext>
		<OMANE_Modules_TauxGarantis_ViewModels:ViewModelStressTests/>
	</UserControl.DataContext>

	<Grid >
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition/>
			<RowDefinition/>
		</Grid.RowDefinitions>
		<Grid.Resources>
            <Style TargetType="ToolTip">
                <Setter Property="Background" Value="White" />
                <Setter Property="BorderBrush" Value="#FF9F50F1" />
                <Setter Property="BorderThickness" Value="2" />
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToolTip">
                            <Border Padding="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5" >
                            	<ContentPresenter ContentSource="Content" />                     
							</Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
                <Style TargetType="{x:Type igCA:DataPoint}">
                <Setter Property="ToolTip">
                    <Setter.Value>
                        <Binding Path="Y">
                            <Binding.Converter>
                                <local:SPConverter />
                            </Binding.Converter>
                        </Binding>
                    </Setter.Value>
                </Setter>
            </Style>
		</Grid.Resources>
		<TextBlock Text="Stress-Tests  autour du scenario central" HorizontalAlignment="Center" FontSize="26.667" FontWeight="Bold" TextWrapping="Wrap" TextAlignment="Center"  Margin="0,5"  />
		<Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="1" CornerRadius="10" Margin="5,5,5,5" Padding="10" >
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<igCA:XamChart Grid.Column="1" EndPaletteBrush="Blue" StartPaletteBrush="Blue">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
						<igCA:Legend Visible="False"/>
					</igCA:XamChart.Legend>
					<igCA:XamChart.Caption>
						<igCA:Caption Text="Stress-Tests : Modification de la proportion des prets immobiliers"/>
					</igCA:XamChart.Caption>
					<igCA:XamChart.Series>
						<igCA:Series DataSource="{Binding ModificationPretsImmobiliers}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y">
							<igCA:Series.Animation>
								<igCA:Animation/>
							</igCA:Series.Animation>
						</igCA:Series>
						<igCA:Series DataSource="{Binding ModificationPretsImmobiliers}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2">
							<igCA:Series.Animation>
								<igCA:Animation/>
							</igCA:Series.Animation>
						</igCA:Series>
					</igCA:XamChart.Series>
				</igCA:XamChart>
				<TextBlock Grid.ColumnSpan="2" Grid.Row="1" TextAlignment="Center" Text="Variation de la proportion des prets immobiliers en nombres de points" />
				<TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right"  >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
				</TextBlock>
			</Grid>
		</Border>
		<Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="2" CornerRadius="10" Margin="5,5,5,5" Padding="10" >
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<igCA:XamChart Grid.Column="1" EndPaletteBrush="Red" StartPaletteBrush="Red">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
						<igCA:Legend Visible="False"/>
					</igCA:XamChart.Legend>
					<igCA:XamChart.Caption>
						<igCA:Caption Text="Stress-Tests : Modification de la proportion de la tranche d'age la plus agee"/>
					</igCA:XamChart.Caption>
					<igCA:XamChart.Series>
						<igCA:Series DataSource="{Binding ModificationProportionAge}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y">
								<igCA:Series.Animation>
								<igCA:Animation/>
							</igCA:Series.Animation>
						</igCA:Series>
						<igCA:Series DataSource="{Binding ModificationProportionAge}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2">
								<igCA:Series.Animation>
								<igCA:Animation/>
							</igCA:Series.Animation>
						</igCA:Series>
					</igCA:XamChart.Series>
				</igCA:XamChart>
				<TextBlock Grid.ColumnSpan="2" Grid.Row="1" TextAlignment="Center" Text="Variation de la tranche d'age la plus agee en nombre de points" />
				<TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"  >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
				</TextBlock>
			</Grid>
		</Border>
	</Grid>
</UserControl>